<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/jquery.js"></script>
</head>

<body>
    <button id="btn1">按钮1</button>
    <button id="btn2">按钮2</button>

    <script>
        $('#btn1').click(function() {
            console.log('btn1被点击了')
        })
        $('#btn2').click(function() {
            // 模拟btn1被点击的效果
            $('#btn1').trigger('click')
        })
    </script>
</body>

</html>